"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Voici une liste de programmes à transcrire en langage machine. \n",
"Vous testerez vos prohrammes en utilisant le simaleur : \n",
"\t\t\t\t\thttp://www.peterhigginson.co.uk/LMC/ \n",
"Remarque importante : le langage macine dépend de la machine. Il existe différentes syntaxes en fonction des processeurs utilisés."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The AQA Instruction Set.\n",
"
LDR Rd, <memory ref>\tLoad the value stored in the memory location specified by <memory ref> into register d.
\n",
"
STR Rd, <memory ref>\tStore the value that is in register d into the memory location specified by <memory ref>.
\n",
"
ADD Rd, Rn, <operand2>\tAdd the value specified in <operand2> to the value in register n and store the result in register d.
\n",
"
SUB Rd, Rn, <operand2>\tSubtract the value specified by <operand2> from the value in register n and store the result in register d.
\n",
"
MOV Rd, <operand2>\t\tCopy the value specified by <operand2> into register d.
\n",
"
CMP Rn, <operand2>\t\tCompare the value stored in register n with the value specified by <operand2>.
\n",
"
B <label>\t\t\t\tAlways branch to the instruction at position <label> in the program.
\n",
"
B<condition> <label>\t\tConditionally branch to the instruction at position <label> in the program if the last comparison met the criteria specified by the <condition>. Possible values for <condition> and their meaning are: EQ:Equal to, NE:Not equal to, GT:Greater than, LT:Less than.
\n",
"
AND Rd, Rn, <operand2>\tPerform a bitwise logical AND operation between the value in register n and the value specified by <operand2> and store the result in register d.
\n",
"
ORR Rd, Rn, <operand2>\tPerform a bitwise logical OR operation between the value in register n and the value specified by <operand2> and store the result in register d.
\n",
"
EOR Rd, Rn, <operand2>\tPerform a bitwise logical exclusive or (XOR) operation between the value in register n and the value specified by <operand2> and store the result in register d.
\n",
"
MVN Rd, <operand2>\t\tPerform a bitwise logical NOT operation on the value specified by <operand2> and store the result in register d.
\n",
"
LSL Rd, Rn, <operand2>\tLogically shift left the value stored in register n by the number of bits specified by <operand2> and store the result in register d.
\n",
"
LSR Rd, Rn, <operand2>\tLogically shift right the value stored in register n by the number of bits specified by <operand2> and store the result in register d.